package com.ymatou.iapi.trading.sellerquery.testcase;

import java.util.ArrayList;
import java.util.List;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.query.seller.trading.api.parameter.Convertor;
import com.ymatou.query.seller.trading.api.parameter.ExistsResponse;
import com.ymatou.query.seller.trading.api.parameter.ExistsSellerExportedOrderInfosBean;
import com.ymatou.query.seller.trading.api.parameter.ExportOrderInfo;
import com.ymatou.query.seller.trading.api.parameter.SellerExportOrderQueryModel;
import com.ymatou.query.seller.trading.api.parameter.TimeRange;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.TestCase;
import com.ymt.utils.annotation.TestSuite;
import com.ymt.utils.tag.P1;
import com.ymt.utils.tag.P3;
import com.ymttest.common.enums.LogisticsTypeEnum;
import com.ymttest.common.enums.OrderStatusEnum;
import com.ymttest.utils.DataUtil;
import com.ymttest.utils.EnvSetup;
import com.ymttest.utils.YMTDateUtil;

/**
 * @date 2016-06-28
 * @author songyefeng
 * @desc 是否存在卖家订单导出信息
 */
@TestSuite
public class Ts_ExistsSellerExportedOrderInfos {

	private static ExistsSellerExportedOrderInfosBean existsSellerExportedOrderInfosBean;
	private static com.ymatou.query.seller.trading.api.service.ExistsSellerExportedOrderInfosCall existsSellerExportedOrderInfosCall;
//	private static com.ymatou.iapi.trading.sellerquery.service.ExistsSellerExportedOrderInfosCall existsSellerExportedOrderInfosCall;
	private static ExistsResponse expectedExistsResponse;

	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("是否存在卖家订单导出信息");
	}

	@Before
	public void caseUp() {
		existsSellerExportedOrderInfosBean = new ExistsSellerExportedOrderInfosBean();
		existsSellerExportedOrderInfosCall = new com.ymatou.query.seller.trading.api.service.ExistsSellerExportedOrderInfosCall();
//		existsSellerExportedOrderInfosCall = new com.ymatou.iapi.trading.sellerquery.service.ExistsSellerExportedOrderInfosCall();
		expectedExistsResponse = new ExistsResponse();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(existsSellerExportedOrderInfosCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}

	private void verify() {
		// get the expect result with expectedExistsResponse
		ConstructExpectedResponse();
		ExistsResponse actualExistsResponse = existsSellerExportedOrderInfosCall
				.getData();
		DataUtil.verifyEquals(expectedExistsResponse.isExists(),
				actualExistsResponse.isExists(), "验证Exists");
	}

	private void ConstructExpectedResponse() {
		Process();
	}

	private void Process() {
		SellerExportOrderQueryModel model = Convertor
				.SellerExportOrderRequestArguments(existsSellerExportedOrderInfosBean);
		boolean exists = ExistsSellerExportedOrderInfosResponseProcessor(model);
		expectedExistsResponse.setExists(exists);
	}

	private boolean ExistsSellerExportedOrderInfosResponseProcessor(
			SellerExportOrderQueryModel model) {
		return ExportOrderInfo.GetExportSellerOrderInfoExistsSqlCommand(model);
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_ExistsSellerExportedOrderInfos_001() {
		Logger.start(true, "获取是否存在卖家订单导出信息成功");
		try {
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			existsSellerExportedOrderInfosBean.setSellerId(SellerId);
			TimeRange paidTime = new TimeRange();
			paidTime.setBegin(YMTDateUtil.getBeforeOrNextDay(-7));
			paidTime.setEnd(YMTDateUtil.getBeforeOrNextDay(0));
			existsSellerExportedOrderInfosBean.setPaidTime(paidTime);
			existsSellerExportedOrderInfosCall
					.setData(existsSellerExportedOrderInfosBean);
			existsSellerExportedOrderInfosCall.callService();
			Logger.verifyEquals("200",
					existsSellerExportedOrderInfosCall.getCode(), "验证code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_ExistsSellerExportedOrderInfos_002() {
		Logger.start(true, "是否存在卖家订单导出信息, 测试paidTime筛选");
		try {
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			existsSellerExportedOrderInfosBean.setSellerId(SellerId);
			TimeRange paidTime = new TimeRange();
			paidTime.setBegin(YMTDateUtil.getBeforeOrNextDay(-3));
			paidTime.setEnd(YMTDateUtil.getBeforeOrNextDay(0));
			existsSellerExportedOrderInfosBean.setPaidTime(paidTime);
			existsSellerExportedOrderInfosCall
					.setData(existsSellerExportedOrderInfosBean);
			existsSellerExportedOrderInfosCall.callService();
			Logger.verifyEquals("200",
					existsSellerExportedOrderInfosCall.getCode(), "验证code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_ExistsSellerExportedOrderInfos_003() {
		Logger.start(true, "是否存在卖家订单导出信息, 测试订单状态为17的筛选");
		try {
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			existsSellerExportedOrderInfosBean.setSellerId(SellerId);
			List<Integer> orderStatus = new ArrayList<Integer>();
			orderStatus.add(OrderStatusEnum.SellerAccept.getValue());
			existsSellerExportedOrderInfosBean.setOrderStatus(orderStatus);
			existsSellerExportedOrderInfosCall
					.setData(existsSellerExportedOrderInfosBean);
			existsSellerExportedOrderInfosCall.callService();
			Logger.verifyEquals("200",
					existsSellerExportedOrderInfosCall.getCode(), "验证code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_ExistsSellerExportedOrderInfos_004() {
		Logger.start(true, "是否存在卖家订单导出信息, paidTime的end为空");
		try {
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			existsSellerExportedOrderInfosBean.setSellerId(SellerId);
			List<Integer> orderStatus = new ArrayList<Integer>();
			orderStatus.add(OrderStatusEnum.OrderPostPay.getValue());
			existsSellerExportedOrderInfosBean.setOrderStatus(orderStatus);
			TimeRange paidTime = new TimeRange();
			paidTime.setBegin(YMTDateUtil.getBeforeOrNextDay(-3));
			existsSellerExportedOrderInfosBean.setPaidTime(paidTime);
			existsSellerExportedOrderInfosCall
					.setData(existsSellerExportedOrderInfosBean);
			existsSellerExportedOrderInfosCall.callService();
			Logger.verifyEquals("200",
					existsSellerExportedOrderInfosCall.getCode(), "验证code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_ExistsSellerExportedOrderInfos_005() {
		Logger.start(true, "是否存在卖家订单导出信息, paidTime的start为空");
		try {
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			existsSellerExportedOrderInfosBean.setSellerId(SellerId);
			List<Integer> orderStatus = new ArrayList<Integer>();
			orderStatus.add(OrderStatusEnum.OrderPostPay.getValue());
			existsSellerExportedOrderInfosBean.setOrderStatus(orderStatus);
			TimeRange paidTime = new TimeRange();
			paidTime.setEnd(YMTDateUtil.getBeforeOrNextDay(-1));
			existsSellerExportedOrderInfosBean.setPaidTime(paidTime);
			existsSellerExportedOrderInfosCall
					.setData(existsSellerExportedOrderInfosBean);
			existsSellerExportedOrderInfosCall.callService();
			Logger.verifyEquals("200",
					existsSellerExportedOrderInfosCall.getCode(), "验证code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_ExistsSellerExportedOrderInfos_006() {
		Logger.start(true, "是否存在卖家订单导出信息, 测试订单状态为101的筛选");
		try {
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			existsSellerExportedOrderInfosBean.setSellerId(SellerId);
			List<Integer> orderStatus = new ArrayList<Integer>();
			orderStatus.add(OrderStatusEnum.OrderPostPay.getValue());
			existsSellerExportedOrderInfosBean.setOrderStatus(orderStatus);
			TimeRange paidTime = new TimeRange();
			paidTime.setBegin(YMTDateUtil.getBeforeOrNextDay(-3));
			paidTime.setEnd(YMTDateUtil.getBeforeOrNextDay(-2));
			existsSellerExportedOrderInfosBean.setPaidTime(paidTime);
			existsSellerExportedOrderInfosCall
					.setData(existsSellerExportedOrderInfosBean);
			existsSellerExportedOrderInfosCall.callService();
			Logger.verifyEquals("200",
					existsSellerExportedOrderInfosCall.getCode(), "验证code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_ExistsSellerExportedOrderInfos_007() {
		Logger.start(true, "是否存在卖家订单导出信息, 订单状态包含101和17");
		try {
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			existsSellerExportedOrderInfosBean.setSellerId(SellerId);
			List<Integer> orderStatus = new ArrayList<Integer>();
			orderStatus.add(OrderStatusEnum.OrderPostPay.getValue());
			orderStatus.add(OrderStatusEnum.SellerAccept.getValue());
			existsSellerExportedOrderInfosBean.setOrderStatus(orderStatus);
			TimeRange paidTime = new TimeRange();
			paidTime.setBegin(YMTDateUtil.getBeforeOrNextDay(-2));
			paidTime.setEnd(YMTDateUtil.getBeforeOrNextDay(-1));
			existsSellerExportedOrderInfosBean.setPaidTime(paidTime);
			existsSellerExportedOrderInfosCall
					.setData(existsSellerExportedOrderInfosBean);
			existsSellerExportedOrderInfosCall.callService();
			Logger.verifyEquals("200",
					existsSellerExportedOrderInfosCall.getCode(), "验证code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_ExistsSellerExportedOrderInfos_008() {
		Logger.start(true, "是否存在卖家订单导出信息, 订单状态包含1,2,3,4,12,13,18,16,17");
		try {
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			existsSellerExportedOrderInfosBean.setSellerId(SellerId);
			List<Integer> orderStatus = new ArrayList<Integer>();
			orderStatus.add(OrderStatusEnum.OrderEstablish.getValue());
			orderStatus.add(OrderStatusEnum.AccountPaid.getValue());
			orderStatus.add(OrderStatusEnum.Shipped.getValue());
			orderStatus.add(OrderStatusEnum.Received.getValue());
			orderStatus.add(OrderStatusEnum.UserAcceptCancel.getValue());
			orderStatus.add(OrderStatusEnum.SellerAcceptCancel.getValue());
			orderStatus.add(OrderStatusEnum.SystemCancel.getValue());
			orderStatus.add(OrderStatusEnum.ApplyForPostPay.getValue());
			orderStatus.add(OrderStatusEnum.SellerAccept.getValue());
			existsSellerExportedOrderInfosBean.setOrderStatus(orderStatus);
			TimeRange paidTime = new TimeRange();
			paidTime.setBegin(YMTDateUtil.getBeforeOrNextDay(-1));
			paidTime.setEnd(YMTDateUtil.getBeforeOrNextDay(0));
			existsSellerExportedOrderInfosBean.setPaidTime(paidTime);
			existsSellerExportedOrderInfosCall
					.setData(existsSellerExportedOrderInfosBean);
			existsSellerExportedOrderInfosCall.callService();
			Logger.verifyEquals("200",
					existsSellerExportedOrderInfosCall.getCode(), "验证code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_ExistsSellerExportedOrderInfos_009() {
		Logger.start(true, "是否存在卖家订单导出信息, 测试payTypes=1");
		try {
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			existsSellerExportedOrderInfosBean.setSellerId(SellerId);
			TimeRange paidTime = new TimeRange();
			paidTime.setBegin(YMTDateUtil.getBeforeOrNextDay(-1));
			paidTime.setEnd(YMTDateUtil.getBeforeOrNextDay(0));
			existsSellerExportedOrderInfosBean.setPaidTime(paidTime);
			List<Integer> payTypes = new ArrayList<Integer>();
			payTypes.add(1);
			existsSellerExportedOrderInfosBean.setPayTypes(payTypes);
			existsSellerExportedOrderInfosCall
					.setData(existsSellerExportedOrderInfosBean);
			existsSellerExportedOrderInfosCall.callService();
			Logger.verifyEquals("200",
					existsSellerExportedOrderInfosCall.getCode(), "验证code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_ExistsSellerExportedOrderInfos_010() {
		Logger.start(true, "是否存在卖家订单导出信息, 测试payTypes=0");
		try {
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			existsSellerExportedOrderInfosBean.setSellerId(SellerId);
			TimeRange paidTime = new TimeRange();
			paidTime.setBegin(YMTDateUtil.getBeforeOrNextDay(-1));
			paidTime.setEnd(YMTDateUtil.getBeforeOrNextDay(0));
			existsSellerExportedOrderInfosBean.setPaidTime(paidTime);
			List<Integer> payTypes = new ArrayList<Integer>();
			payTypes.add(0);
			existsSellerExportedOrderInfosBean.setPayTypes(payTypes);
			existsSellerExportedOrderInfosCall
					.setData(existsSellerExportedOrderInfosBean);
			existsSellerExportedOrderInfosCall.callService();
			Logger.verifyEquals("200",
					existsSellerExportedOrderInfosCall.getCode(), "验证code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_ExistsSellerExportedOrderInfos_011() {
		Logger.start(true, "是否存在卖家订单导出信息, 测试payTypes=0和1");
		try {
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			existsSellerExportedOrderInfosBean.setSellerId(SellerId);
			TimeRange paidTime = new TimeRange();
			paidTime.setBegin(YMTDateUtil.getBeforeOrNextDay(-1));
			paidTime.setEnd(YMTDateUtil.getBeforeOrNextDay(0));
			existsSellerExportedOrderInfosBean.setPaidTime(paidTime);
			List<Integer> payTypes = new ArrayList<Integer>();
			payTypes.add(0);
			payTypes.add(1);
			existsSellerExportedOrderInfosBean.setPayTypes(payTypes);
			existsSellerExportedOrderInfosCall
					.setData(existsSellerExportedOrderInfosBean);
			existsSellerExportedOrderInfosCall.callService();
			Logger.verifyEquals("200",
					existsSellerExportedOrderInfosCall.getCode(), "验证code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_ExistsSellerExportedOrderInfos_012() {
		Logger.start(true, "是否存在卖家订单导出信息, 测试配送方式的筛选");
		try {
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			existsSellerExportedOrderInfosBean.setSellerId(SellerId);
			List<Integer> logisticsTypes = new ArrayList<Integer>();
			logisticsTypes.add(LogisticsTypeEnum.China.getValue());
			logisticsTypes.add(LogisticsTypeEnum.AuthenticatedDirectDelivery
					.getValue());
			logisticsTypes.add(LogisticsTypeEnum.SailProtect.getValue());
			existsSellerExportedOrderInfosBean
					.setLogisticsTypes(logisticsTypes);
			TimeRange paidTime = new TimeRange();
			paidTime.setBegin(YMTDateUtil.getBeforeOrNextDay(-60));
			paidTime.setEnd(YMTDateUtil.getBeforeOrNextDay(0));
			existsSellerExportedOrderInfosBean.setPaidTime(paidTime);
			List<Integer> payTypes = new ArrayList<Integer>();
			payTypes.add(0);
			payTypes.add(1);
			existsSellerExportedOrderInfosBean.setPayTypes(payTypes);
			existsSellerExportedOrderInfosCall
					.setData(existsSellerExportedOrderInfosBean);
			existsSellerExportedOrderInfosCall.callService();
			Logger.verifyEquals("200",
					existsSellerExportedOrderInfosCall.getCode(), "验证code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_ExistsSellerExportedOrderInfos_013() {
		Logger.start(true, "是否存在卖家订单导出信息, 测试配送方式的筛选");
		try {
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			existsSellerExportedOrderInfosBean.setSellerId(SellerId);
			List<Integer> logisticsTypes = new ArrayList<Integer>();
			logisticsTypes.add(LogisticsTypeEnum.SailProtect.getValue());
			logisticsTypes.add(LogisticsTypeEnum.AuthenticatedDirectDelivery
					.getValue());
			logisticsTypes.add(LogisticsTypeEnum.PackageDelivery.getValue());
			logisticsTypes.add(LogisticsTypeEnum.US.getValue());
			logisticsTypes.add(LogisticsTypeEnum.BondedDelivery.getValue());
			logisticsTypes
					.add(LogisticsTypeEnum.XloboBondedDelivery.getValue());
			existsSellerExportedOrderInfosBean
					.setLogisticsTypes(logisticsTypes);
			TimeRange createdTime = new TimeRange();
			createdTime.setBegin(YMTDateUtil.getBeforeOrNextDay(-60));
			createdTime.setEnd(YMTDateUtil.getBeforeOrNextDay(0));
			existsSellerExportedOrderInfosBean.setCreatedTime(createdTime);
			List<Integer> orderStatus = new ArrayList<Integer>();
			orderStatus.add(OrderStatusEnum.Shipped.getValue());
			existsSellerExportedOrderInfosBean.setOrderStatus(orderStatus);
			List<Integer> payTypes = new ArrayList<Integer>();
			payTypes.add(0);
			payTypes.add(1);
			existsSellerExportedOrderInfosBean.setPayTypes(payTypes);
			existsSellerExportedOrderInfosCall
					.setData(existsSellerExportedOrderInfosBean);
			existsSellerExportedOrderInfosCall.callService();
			Logger.verifyEquals("200",
					existsSellerExportedOrderInfosCall.getCode(), "验证code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_ExistsSellerExportedOrderInfos_014() {
		Logger.start(true, "获取是否存在卖家订单导出信息失败, SellerId为空");
		try {
			existsSellerExportedOrderInfosBean.setSellerId(null);
			List<Integer> logisticsTypes = new ArrayList<Integer>();
			logisticsTypes.add(LogisticsTypeEnum.SailProtect.getValue());
			logisticsTypes.add(LogisticsTypeEnum.AuthenticatedDirectDelivery
					.getValue());
			logisticsTypes.add(LogisticsTypeEnum.PackageDelivery.getValue());
			logisticsTypes.add(LogisticsTypeEnum.US.getValue());
			logisticsTypes.add(LogisticsTypeEnum.BondedDelivery.getValue());
			logisticsTypes
					.add(LogisticsTypeEnum.XloboBondedDelivery.getValue());
			existsSellerExportedOrderInfosBean
					.setLogisticsTypes(logisticsTypes);
			TimeRange createdTime = new TimeRange();
			createdTime.setBegin(YMTDateUtil.getBeforeOrNextDay(-60));
			createdTime.setEnd(YMTDateUtil.getBeforeOrNextDay(0));
			existsSellerExportedOrderInfosBean.setCreatedTime(createdTime);
			List<Integer> orderStatus = new ArrayList<Integer>();
			orderStatus.add(OrderStatusEnum.Shipped.getValue());
			existsSellerExportedOrderInfosBean.setOrderStatus(orderStatus);
			List<Integer> payTypes = new ArrayList<Integer>();
			payTypes.add(0);
			payTypes.add(1);
			existsSellerExportedOrderInfosBean.setPayTypes(payTypes);
			existsSellerExportedOrderInfosCall
					.setData(existsSellerExportedOrderInfosBean);
			existsSellerExportedOrderInfosCall.callService();
			Logger.verifyEquals("400",
					existsSellerExportedOrderInfosCall.getCode(), "验证code");
//			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_ExistsSellerExportedOrderInfos_015() {
		Logger.start(true, "获取是否存在卖家订单导出信息成功, SellerId不存在");
		try {
			existsSellerExportedOrderInfosBean.setSellerId(404);
			List<Integer> logisticsTypes = new ArrayList<Integer>();
			logisticsTypes.add(LogisticsTypeEnum.SailProtect.getValue());
			logisticsTypes.add(LogisticsTypeEnum.AuthenticatedDirectDelivery
					.getValue());
			logisticsTypes.add(LogisticsTypeEnum.PackageDelivery.getValue());
			logisticsTypes.add(LogisticsTypeEnum.US.getValue());
			logisticsTypes.add(LogisticsTypeEnum.BondedDelivery.getValue());
			logisticsTypes
					.add(LogisticsTypeEnum.XloboBondedDelivery.getValue());
			existsSellerExportedOrderInfosBean
					.setLogisticsTypes(logisticsTypes);
			TimeRange createdTime = new TimeRange();
			createdTime.setBegin(YMTDateUtil.getBeforeOrNextDay(-60));
			createdTime.setEnd(YMTDateUtil.getBeforeOrNextDay(0));
			existsSellerExportedOrderInfosBean.setCreatedTime(createdTime);
			List<Integer> orderStatus = new ArrayList<Integer>();
			orderStatus.add(OrderStatusEnum.Shipped.getValue());
			existsSellerExportedOrderInfosBean.setOrderStatus(orderStatus);
			List<Integer> payTypes = new ArrayList<Integer>();
			payTypes.add(0);
			payTypes.add(1);
			existsSellerExportedOrderInfosBean.setPayTypes(payTypes);
			existsSellerExportedOrderInfosCall
					.setData(existsSellerExportedOrderInfosBean);
			existsSellerExportedOrderInfosCall.callService();
			Logger.verifyEquals("200",
					existsSellerExportedOrderInfosCall.getCode(), "验证code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_ExistsSellerExportedOrderInfos_016() {
		Logger.start(true, "获取是否存在卖家订单导出信息失败, SellerId为0");
		try {
			existsSellerExportedOrderInfosBean.setSellerId(404);
			List<Integer> logisticsTypes = new ArrayList<Integer>();
			logisticsTypes.add(LogisticsTypeEnum.SailProtect.getValue());
			logisticsTypes.add(LogisticsTypeEnum.AuthenticatedDirectDelivery
					.getValue());
			logisticsTypes.add(LogisticsTypeEnum.PackageDelivery.getValue());
			logisticsTypes.add(LogisticsTypeEnum.US.getValue());
			logisticsTypes.add(LogisticsTypeEnum.BondedDelivery.getValue());
			logisticsTypes
					.add(LogisticsTypeEnum.XloboBondedDelivery.getValue());
			existsSellerExportedOrderInfosBean
					.setLogisticsTypes(logisticsTypes);
			TimeRange createdTime = new TimeRange();
			createdTime.setBegin(YMTDateUtil.getBeforeOrNextDay(-60));
			createdTime.setEnd(YMTDateUtil.getBeforeOrNextDay(0));
			existsSellerExportedOrderInfosBean.setCreatedTime(createdTime);
			List<Integer> orderStatus = new ArrayList<Integer>();
			orderStatus.add(OrderStatusEnum.Shipped.getValue());
			existsSellerExportedOrderInfosBean.setOrderStatus(orderStatus);
			List<Integer> payTypes = new ArrayList<Integer>();
			payTypes.add(0);
			payTypes.add(1);
			existsSellerExportedOrderInfosBean.setPayTypes(payTypes);
			existsSellerExportedOrderInfosCall
					.setData(existsSellerExportedOrderInfosBean);
			existsSellerExportedOrderInfosCall.callService();
			Logger.verifyEquals("200",
					existsSellerExportedOrderInfosCall.getCode(), "验证code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_ExistsSellerExportedOrderInfos_017() {
		Logger.start(true, "是否存在卖家订单导出信息, 测试buyernickname的筛选");
		try {
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			existsSellerExportedOrderInfosBean.setSellerId(SellerId);
			existsSellerExportedOrderInfosBean.setBuyerNickName("test007");
			TimeRange createdTime = new TimeRange();
			createdTime.setBegin(YMTDateUtil.getBeforeOrNextDay(-60));
			createdTime.setEnd(YMTDateUtil.getBeforeOrNextDay(0));
			existsSellerExportedOrderInfosBean.setCreatedTime(createdTime);
			List<Integer> orderStatus = new ArrayList<Integer>();
			orderStatus.add(OrderStatusEnum.Shipped.getValue());
			existsSellerExportedOrderInfosBean.setOrderStatus(orderStatus);
			List<Integer> payTypes = new ArrayList<Integer>();
			payTypes.add(0);
			payTypes.add(1);
			existsSellerExportedOrderInfosBean.setPayTypes(payTypes);
			existsSellerExportedOrderInfosCall
					.setData(existsSellerExportedOrderInfosBean);
			existsSellerExportedOrderInfosCall.callService();
			Logger.verifyEquals("200",
					existsSellerExportedOrderInfosCall.getCode(), "验证code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}